﻿using System.Net;
using System.Reflection;
using System.Reflection.Emit;
using System.Text;
using rpc_service.cache;
using rpc_service.core.support.assembly.il;

namespace rpc_service.core.support.assembly.il.http.get;

public class ILRPCAsyncGetHttpRequest : ILGetHttpRequest
{
    protected override bool isPass(string httpMethod, Type returnType)
    {
        if (httpMethod != "GET" && returnType != "Task".GetTypeByStr())
        {
            return false;
        }

        return true;
    }

    protected override void httpRequst(
        ILGenerator il, 
        LocalBuilder result, 
        LocalBuilder requestLocal,
        LocalBuilder responseLocal,
        LocalBuilder receiveStreamLocal,
        LocalBuilder readStreamLocal, 
        Type targetType, 
        MethodInfo targetMethod)
    {
        throw new NotImplementedException();
    }
}